#pragma once

#include <QDockWidget>
#include <QVector>
#include "actorbase.h"
#include <osg\ref_ptr>

class QTreeWidget;
class QPushButton;
class QTreeWidgetItem;
class QMenu;
class QAction;

namespace VrDataCore
{
	class AllActorFactory;
}

class RemarkEditDockWidget:public QDockWidget
{
	Q_OBJECT
public:
	RemarkEditDockWidget(QWidget* parent = 0,Qt::WindowFlags flags = 0);
	~RemarkEditDockWidget();

private slots:
	void slotsCurrentMapChanged();
	void slotsClearScene();
	void slotsSelectClick(bool);
	void slotsCancelClick(bool);
	void slotsPreviewClick(bool);
	void show_contextmenu(const QPoint&);
	void slotsActionBeforeCreateDevices(QVector<CoreBase::ActorBase*> vector);
	void slotsAddRemarkLayer();
	void slotsRemove();
	void slotsAddBubbleRemark();
	void slotsRename();
private:
	void initGui();
	void constructTree(QTreeWidgetItem* parent,CoreBase::ActorBase* actor);
	void updateStatus();
	QTreeWidget*						_remarkTreeWidget;
	QPushButton*						_selectButton;
	QPushButton*						_cancelButton;
	QPushButton*						_previewButton;
	CoreBase::ActorBase*				_previewRemarkLayer;
	QMenu*								_mainMenu;
	QAction*							_addRemarkLayer;
	QAction*							_removeAction;
	QMenu*								_addRemark;
	QAction*							_addBubbleRemark;
	QAction*							_rename;
	VrDataCore::AllActorFactory*		_actorFactory;
	QVector<QString>					_allRemarkLayerName;
	osg::ref_ptr<CoreBase::ActorBase>	_createRemarkActor;
};